<include file="common/header" />
<script type="text/javascript" src="/javascript/region.js"></script>
<script type='text/javascript'  src='/kindeditor/kindeditor.js'></script>
<div class="main-container">
    <div class="container">
        <div class="row step-item mb15">
            <div class="col-xs-3 step step1 current">1.项目信息<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step2">2.回报设置<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step3">3.发起人信息<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step4">4.完成</div>
        </div>
        <div class="row">
            <div class="col-sm-8">
                <div class="left-main">
                    <h1 class="text-center f18 fb gain-main-title">项目信息</h1>
                    <form class="ui-form" id="create-form" action="/Project/save/" method="post" autocomplete="off">
                        <input type="hidden" name="id" value="{$deal_item.id}" />
                        <input type="hidden" name="savenext" value="1" />
                        <div class="row">
                            <label class="col-xs-2">项目名称：</label>
                            <div class="col-xs-10">
                                <div class="ipt">
                                    <input name="name" value="{$deal_item.name}" maxlength="40" type="text" placeholder="名称不超过40个字">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">筹资金额：</label>
                            <div class="col-xs-5">
                                <div class="ipt">
                                    <input type="text" name="limit_price" class="is_money" value="{$deal_item.limit_price}" placeholder="不少于500元">
                                </div>
                            </div>
                            <div class="col-xs-1 unit">元</div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">筹集天数：</label>
                            <div class="col-xs-5">
                                <div class="ipt">
                                    <input type="text" name="deal_days" maxlength="2" value="{$deal_item.deal_days}" class="is_num" placeholder="10-90天">
                                </div>
                            </div>
                            <div class="col-xs-1 unit">天</div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">所在地：</label>
                            <div class="col-xs-10">
                                <div class="ipt clearfix">
                                    <div class="col-xs-6">
                                        <select class="form-control province-list" name="province">
                                            <option class="items" rel="0">
                                                <empty name="$deal_item.province">
                                                    请选择省份
                                                    <else />
                                                    {$deal_item.province}
                                                </empty>
                                            </option>
                                            <option class="items" data-val="安徽" rel="3">安徽</option>
                                            <option class="items" data-val="澳门" rel="396">澳门</option>
                                            <option class="items" data-val="北京" rel="52">北京</option>
                                            <option class="items" data-val="重庆" rel="394">重庆</option>
                                            <option class="items" data-val="福建" rel="4">福建</option>
                                            <option class="items" data-val="甘肃" rel="5">甘肃</option>
                                            <option class="items" data-val="广东" rel="6">广东</option>
                                            <option class="items" data-val="广西" rel="7">广西</option>
                                            <option class="items" data-val="贵州" rel="8">贵州</option>
                                            <option class="items" data-val="海南" rel="9">海南</option>
                                            <option class="items" data-val="河北" rel="10">河北</option>
                                            <option class="items" data-val="黑龙江" rel="12">黑龙江</option>
                                            <option class="items" data-val="河南" rel="11">河南</option>
                                            <option class="items" data-val="湖北" rel="13">湖北</option>
                                            <option class="items" data-val="湖南" rel="14">湖南</option>
                                            <option class="items" data-val="江苏" rel="16">江苏</option>
                                            <option class="items" data-val="江西" rel="17">江西</option>
                                            <option class="items" data-val="吉林" rel="15">吉林</option>
                                            <option class="items" data-val="辽宁" rel="18">辽宁</option>
                                            <option class="items" data-val="内蒙古" rel="19">内蒙古</option>
                                            <option class="items" data-val="宁夏" rel="20">宁夏</option>
                                            <option class="items" data-val="青海" rel="21">青海</option>
                                            <option class="items" data-val="山东" rel="22">山东</option>
                                            <option class="items" data-val="上海" rel="321">上海</option>
                                            <option class="items" data-val="山西" rel="23">山西</option>
                                            <option class="items" data-val="陕西" rel="24">陕西</option>
                                            <option class="items" data-val="四川" rel="26">四川</option>
                                            <option class="items" data-val="台湾" rel="397">台湾</option>
                                            <option class="items" data-val="天津" rel="343">天津</option>
                                            <option class="items" data-val="香港" rel="395">香港</option>
                                            <option class="items" data-val="西藏" rel="28">西藏</option>
                                            <option class="items" data-val="新疆" rel="29">新疆</option>
                                            <option class="items" data-val="云南" rel="30">云南</option>
                                            <option class="items" data-val="浙江" rel="31">浙江</option>
                                        </select>
                                    </div>
                                    <div class="col-xs-6">
                                        <select class="form-control city-list" name="city">
                                            <option class="items" rel="0">
                                                <empty name="$deal_item.city">
                                                    请选择城市
                                                    <else />
                                                    {$deal_item.city}
                                                </empty>
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row type-list">
                            <label class="col-xs-2 type-lable">类别：</label>
                            <div class="col-xs-10 wrap-btn-type">
                                <volist name="cate_list" id="vo">
                                    <div class="btn-type <if condition="($vo['id'] eq $deal_item['cate_id'])">current</if>">
                                        <input type="radio" name="cate_id" value="{$vo.id}" <if condition="($vo['id'] eq $deal_item['cate_id'])">checked</if>>
                                        {$vo.name}
                                    </div>
                                </volist>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">项目封面：</label>
                            <div class="col-xs-5 ipt">
                                <input type="hidden" name="image" value="{$deal_item.image}">
                                <div id="fileList" class="uploader-list"></div>
                                <a class="ui-btn ui-btn-blue btn-up" id="filePicker">上传封面</a>
                                <span class="fc-red">建议尺寸705*185</span>
                                <img id="upload_image" style="width:200px;height:200px;<empty name="deal_item['image']">display: none;</empty>margin-top: 20px;" src="{$deal_item.image}">
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">视频：</label>
                            <div class="col-xs-10">
                                <div class="ipt">
                                    <input type="text" name="video" value="{$deal_item.video}" placeholder="请输入优酷视频的播放地址">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">项目简介：</label>
                            <div class="col-xs-10">
                                <div class="wrap-textarea textarea-f ipt">
                                    <textarea id="setp-textarea1" name="brief" maxlength="75" placeholder="不超过75个字">{$deal_item.brief}</textarea>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">项目描述：</label>
                            <div class="col-xs-10">
                                <div class="wrap-textarea textarea-f ipt">
                                    <script type='text/javascript'>
                                        var VAR_MODULE = "m";
                                        var VAR_ACTION = "a";
                                        var ROOT = '/index.php';
                                        var ROOT_PATH = '/';
                                        var eid = 'setp-textarea2';
                                        KindEditor.ready(function(K) {
                                            window.editor = K.create('#setp-textarea2', {
                                                resizeType : 2,
                                                uploadJson : '/File/do_upload_img', // 相对于当前页面的路径
                                                items : ['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
                                                    'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                                                    'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                                                    'superscript', '|', 'selectall', '-',
                                                    'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
                                                    'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
                                                    'flash', 'media', 'advtable', 'hr', 'emoticons', 'link', 'unlink', '|', 'about']

                                            });
                                        });
                                    </script>
                                    <textarea id="setp-textarea2" name="description" style='width:100%; min-height:350px;'>{$deal_item.description}</textarea>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2">标签：</label>
                            <div class="col-xs-10">
                                <div class="ipt">
                                    <input name="tags" type="text" value="{$deal_item.tags}" placeholder="请使用空格或逗号分隔不同标签">
                                </div>
                            </div>
                        </div>


                        <div class="row text-center mt30">
                            <a class="ui-btn ui-btn-blue btn-create-red-next" id="btn_create_project"><span class="text">下一步</span><span class="sign-btn">&gt</span></a>
                            <p class="tips mt10 f14 fc-red"></p>
                        </div>
                    </form>
                </div>



            </div>
            <div class="col-xs-4 hidden-xs">
                <div class="right-sidebar">
                    <img src="/images/home/upload/ex03.png" />
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        var uploader = WebUploader.create({
            auto: true,
            chunked: false,
            method: 'POST',
            disableGlobalDnd: true,
            fileNumLimit: 1,
            //fileSizeLimit: 1024000,
            swf: '/javascript/home/webuploader/Uploader.swf',
            server: '/Project/upload_image',
            pick: '#filePicker',
            accept: {
                title: '选择封面图片',
                extensions: 'gif,jpg,jpeg,png',
                mimeTypes: 'image/*'
            }
        });
        uploader.on('uploadSuccess', function (file,response) {
            var data = JSON.parse(response._raw);
            $('#upload_image').show().attr('src',data.result + '?rand='+Math.random());
            $('input[name=image]').val(data.result);
            uploader.reset();
        });
    });
</script>
<include file="common/footer" />